package beans;

import entities.Escursione;
import controllers.EscursioneFacade;
import java.io.Serializable;
import javax.annotation.PostConstruct;
import javax.faces.event.ActionEvent;
import javax.inject.Named;
import javax.inject.Inject;
import javax.faces.view.ViewScoped;

@Named(value = "escursioneController")
@ViewScoped
public class EscursioneController extends AbstractController<Escursione> implements Serializable {

    @Inject
    private EscursioneFacade ejbFacade;

    public EscursioneController() {
        super(Escursione.class);
    }

    @PostConstruct
    public void init() {
        super.setFacade(ejbFacade);
    }
    
    
    
    @Override
     public void saveNew(ActionEvent event) {
        super.selected.setIdESCURSIONE(super.selected.getElemento().getIdELEMENTO());
        super.saveNew(event);
    }

}
